package com.hs.sqlite3.task;

import com.hs.sqlite3.service.SqlitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

 @Configuration  //标记配置类
 @EnableScheduling   //开启定时任务
public class SqliteTask {
     @Autowired
     SqlitService sqlitService;
     /**
      * 消费温度记录
      */
    @Scheduled(cron ="*/3 * * * * ?")
    public void sync11(){
        sqlitService.comsum("tb_temp","/api/temp/addBatch");
    }

}
